var express = require('express');
var UserRouter = express.Router();
// 图片上传
const multer = require('multer')
const upload =  multer({dest:'public/avataruploads/'}) 


const UserController = require('../../controller/admin/UserController') 

UserRouter.post("/adminapi/user/login", UserController.login)

UserRouter.post("/adminapi/user/upload", upload.single('file'), UserController.uploadFile)

UserRouter.post("/adminapi/user/addUser", upload.single('file'), UserController.addUser)

UserRouter.get("/adminapi/user/userlist", UserController.getUserList)

UserRouter.delete("/adminapi/user/deleteUser/:id" ,UserController.deleteUser)


module.exports = UserRouter 
